import Vue from 'vue'
import Router from 'vue-router'
//引入子路由模块
import agent from "./agent"
import addres from "./addres"
import deal from "./deal"
import login from "./login"
import logon from "./logon"
import massige from "./massige"
import overseas from "./overseas"
import renting from "./renting"
import secondhandhous from "./secondhandhous"
import sellinghouse from "./sellinghouse"
import user from "./user"
import details from "./details"
import find from "./find"
import xiangqing from "./xiangqing"

import childrenRouterView from "@/components/childrenRouterView"
import homepage from '@/components/homepage'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'homepage',
      component: homepage
    },
	{
		path: '/details',
		name: 'details',
		component:childrenRouterView,
		children:details
	},
	{
		path: '/find',
		name: 'find',
		component:childrenRouterView,
		children:find
	},
	{
		path: '/agent',
		name: 'agent',
		component:childrenRouterView,
		children:agent
	},
		{
			path:'/addres',
			name: 'addres',
			component:childrenRouterView,
			children:addres
		},
		{
		  path: '/deal',
		  name: 'deal',
		  component:childrenRouterView,
			children:deal
		},
		{
		  path: '/login',
		  name: 'login',
		  component:childrenRouterView,
			children:login
		},
		{
		  path: '/logon',
		  name: 'logon',
		  component:childrenRouterView,
			children:logon
		},{
			path: '/massige',
			name: 'massige',
			component:childrenRouterView,
			children:massige
		},{
			path: '/overseas',
			name: 'overseas',
			component:childrenRouterView,
			children:overseas
		},{
			path: '/renting',
			name: 'renting',
			component:childrenRouterView,
			children:renting
		},{
			path: '/secondhandhous',
			name: 'secondhandhous',
			component:childrenRouterView,
			children:secondhandhous
		},{
			path: '/sellinghouse',
			name: 'sellinghouse',
			component:childrenRouterView,
			children:sellinghouse
		},{
			path: '/user',
			name: 'user',
			component:childrenRouterView,
			children:user
		},
		{
			path: '/xiangqing',
			name: 'xiangqing',
			component:childrenRouterView,
			children:xiangqing
		}
  ]
})
